To be able to edit code and run cells, you need to run the notebook yourself. Where would you like to run the notebook?

In the cloud (experimental)

Binder is a free, open source service that runs scientific notebooks in the cloud! It will take a while, usually 2-7 minutes to get a session.

On your computer

(Recommended if you want to store your changes.)

  1. Copy the notebook URL:
  2. Run Pluto

    (Also see: How to install Julia and Pluto)

  3. Paste URL in the Open box

Frontmatter

If you are publishing this notebook on the web, you can set the parameters below to provide HTML metadata. This is useful for search engines and social media.

Author 1
👀 Reading hidden code
import Pkg
268 μs
👀 Reading hidden code
Pkg.activate()
❔
  Activating project at `~/.julia/environments/v1.7`
140 ms
Error message

The package MarkdownLiteral.jl could not load because it failed to initialize.

That's not nice! Things you could try:

  • Restart the notebook.
  • Try a different Julia version.
  • Contact the developers of MarkdownLiteral.jl about this error.

You might find useful information in the package installation log:

👀 Reading hidden code
using MarkdownLiteral: @markdown
---
Hey! This is some text. Can you read me?

Plain text looks a bit boring...
👀 Reading hidden code
Text("""
Hey! This is some text. Can you read me?

Plain text looks a bit boring...
""")
12.5 μs
Error message

Another cell defining @markdown contains errors.

@markdown("""
# MarkdownLiteral.jl

The macro `@markdown` lets you write [Markdown](https://www.markdownguide.org/getting-started/) inside Pluto notebooks. *Here is an example:*
""")
👀 Reading hidden code
---
Error message

Another cell defining @markdown contains errors.

@markdown("""
<p>
The macro <code>@markdown</code> lets you write <a href="https://developer.mozilla.org/docs/Web/HTML">HTML</a> inside Pluto notebooks.
<em>Here is an example:</em>
</p>
""")
👀 Reading hidden code
---
Error message

Another cell defining @markdown contains errors.

computer bad, you GREAT!
@markdown("""
Did you see that? It is the same macro!
""")
👀 Reading hidden code
---
films = [
(title="Frances Ha", director="Noah Baumbach", year=2012)
(title="Portrait de la jeune fille en feu", director="Céline Sciamma", year=2019)
(title="De noorderlingen", director="Alex van Warmerdam", year=1992)
]
👀 Reading hidden code
30.2 μs
Error message

Another cell defining @markdown contains errors.

You got this!
@markdown("""
My films:
$([
"- **$(f.title)** ($(f.year)) by _$(f.director)_\n"
for f in films
])
""")
👀 Reading hidden code
---
Error message

Another cell defining @markdown contains errors.

@markdown("""
<ul>
$([
@markdown("<li>
<b>$(f.title)</b> ($(f.year)) by <em>$(f.director)</em>
</li>")
for f in films
])
</ul>
""")
👀 Reading hidden code
---
logs = [
(text="Info", urgent=false),
(text="Alert", urgent=true),
(text="Update", urgent=false),
]
👀 Reading hidden code
27.1 μs
Error message

Another cell defining @markdown contains errors.

uhmmmmmm??!
@markdown("$((
@markdown("<div style=$((
color="darkblue",
background=log.urgent ? "pink" : "lightblue",
font_weight=900,
padding=".5em",
))>$(log.text)</div>")
for log in logs
))")
👀 Reading hidden code
---

👀 Reading hidden code
68.5 μs